﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using System.Collections.ObjectModel;

namespace HabitAnalyzer
{
    /// <summary>
    /// Interaction logic for CategoryReport.xaml
    /// </summary>
    public partial class CategoryReport : Window
    {
                
        ObservableCollection<SessionActivity> _ActInfo = new ObservableCollection<SessionActivity>();
        
        public CategoryReport(List<SessionActivity> l, string title)
        {

            InitializeComponent();
            this.Title = title;
            int i,c=l.Count;
            if (c == 0)
            {
                label1.Visibility = Visibility.Visible;
                table.Visibility = Visibility.Hidden;
            }
            for (i = 0; i < c; i++)
            {
                DbUtility db = new DbUtility();
                Console.WriteLine("for loop", i);
                _ActInfo.Add(l.ElementAt<SessionActivity>(i));
                
                

                
            }
            

            Console.WriteLine("here");
            Console.WriteLine(l.ToString());
            Console.WriteLine("done");
            
            
        }

        public ObservableCollection<SessionActivity> ActInfo
        { get { return _ActInfo; } }
        
    }
}
